package com.teach.gui.until;

import java.awt.*;

/**
 * CLASS:GUITest02：
 * TODU:
 * date:2021/1/25、18:56
 * version:0.1
 */
public class GUITest02 extends MyFrame{
    public int x;
    public int y;

    public Image earth = ImageUutil.getImage("img/earth.jpg");


    public GUITest02(){
        super.init("02");
        this.x = 100;
        this.y = 200;

    }

    @Override
    public void paint(Graphics g) {
//        初始位置0，0
        g.drawImage(earth,x,y,null);
//        改变

        x+=5;
        y+=5;
        //        在画一次，新的位置
        g.drawImage(earth,x,y,null);
        //g.drawString(Integer.toString(x) ,100,100);
        g.drawString("zuobiao"+x ,100,100);
    }
    public static void main(String[] args) {
        new GUITest02();
    }

}
